{extend name="base" /}
{block name="title"}
管理后台
{/block}
{block name="main"}

      <div class="am-cf am-padding am-padding-bottom-0">
        <div class="am-fl am-cf"><strong class="am-text-primary am-text-lg">表格</strong> / <small>Table</small></div>
      </div>

      <hr>

      <div class="am-g">
        <div class="am-u-sm-12 am-u-md-6">
          <div class="am-btn-toolbar">
            <div class="am-btn-group am-btn-group-xs">
<!--              <button type="button" class="am-btn am-btn-default"><span class="am-icon-plus"></span> 新增</button>
              <button type="button" class="am-btn am-btn-default"><span class="am-icon-save"></span> 保存</button>
              <button type="button" class="am-btn am-btn-default"><span class="am-icon-archive"></span> 审核</button>
              <button type="button" class="am-btn am-btn-default"><span class="am-icon-trash-o"></span> 删除</button>-->
            </div>
          </div>
        </div>
        <div class="am-u-sm-12 am-u-md-3">
          <div class="am-form-group">
            <form action="" method="get">  
            <select data-am-selected="{btnSize: 'sm'}" name="topicId">
                <option value="0">全部</option>
                {foreach name="topList" item="vo"}
                <option value="{$vo.id}" <?php
                try {
                    if($_GET['topicId']==$vo['id']) echo 'selected';
                } catch (Exception $exc) {
                    
                }

                 ?>>{$vo.tag_name}</option>
                {/foreach}
            </select>
              <button class="am-btn am-btn-default" type="submit">确认</button>
              </form>
          </div>
        </div>
        <div class="am-u-sm-12 am-u-md-3">
          <div class="am-input-group am-input-group-sm">
              <input type="text" class="am-form-field" style="opacity: 0;">
          <span class="am-input-group-btn">
              <button class="am-btn am-btn-default" type="button" onclick="window.location.reload();">刷新</button>
          </span>
          </div>
        </div>
      </div>

      <div class="am-g">
        <div class="am-u-sm-12">
          <form class="am-form">
            <table class="am-table am-table-striped am-table-hover table-main">
              <thead>
              <tr>
                <th class="table-check"><input type="checkbox" /></th><th class="table-id">ID</th><th class="table-title">登录名</th><th class="table-type">姓名</th><th class="table-author am-hide-sm-only">班级</th><th class="table-date am-hide-sm-only">上次学习时间</th><th class="table-date am-hide-sm-only">学习进度</th><th class="table-date am-hide-sm-only">错题数</th><th class="table-set">操作</th>
              </tr>
              </thead>
              <tbody>
                {foreach name="user_data.list.data" item="vo"}
              <tr>
                <td><input type="checkbox" value="{$vo.id}" /></td>
                <td>{$vo.id}</td>
                <td><a href="#">{$vo.username}</a></td>
                <td>{$vo.remark}</td>
                <td class="am-hide-sm-only">初中三年级</td>
                <td class="am-hide-sm-only">{if $user_data['etime_arr'][$vo['id']]['etime'] !=false } {$user_data['etime_arr'][$vo['id']]['etime']|date="Y-m-d H:i:s",###}{/if}{if  $user_data['etime_arr'][$vo['id']]['etime'] ==false && $user_data['etime_arr'][$vo['id']]['ctime'] ==true}{$user_data['etime_arr'][$vo['id']]['ctime']|date="Y-m-d H:i:s",###}{/if}</td>
                <td class="am-hide-sm-only">
                    <?php
                    if($user_data['key_count'][$vo['id']]/$count_key*100>100){
                        echo '100%';
                    }else{
                        echo $user_data['key_count'][$vo['id']]/$count_key*100;echo "%";
                    }
                    ?>
                    </td>
                <td class="am-hide-sm-only">{$user_data['err_num'][$vo['id']]}个</td>
                <td>
                  
                    <a href="{url link='errQuestion'  vars='user_id=$vo[id]' suffix='true' domain='true'}" >查看错题</a>&nbsp;|&nbsp;
                    <a href="{url link='errQuestion'  vars='user_id=$vo[id]&q_forms=1' suffix='true' domain='true'}" >查看主观题</a>
                </td>
              </tr>
              {/foreach}
              </tbody>
            </table>
            <div class="am-cf">
              共 {$user_data.list.total} 条记录
              <div class="am-fr">
                {$user_data.page}
              </div>
            </div>
            <hr />
            <p>注：.....</p>
          </form>
        </div>

      </div>

<script src="/static/js/jquery-1.11.3.js"></script>
<script src="/static/layer/layer.js"></script>

{/block}
